// Copyright (c) 2012 NetPipe
// All Rights Reserved.

/**
 * @file GlobalConfig.h
 * 业务配置，用以存放小说类别等信息
 * @author fanpc
 * @date 2012/07/25
 * @version 1.0
 * @note Create
 * Date		     Ver	     Name	   Description
 * 20120725		 1.1.0		 fanpc	   create
 */
#ifndef NP_CONFIG_NOVELCONFIG_H
#define NP_CONFIG_NOVELCONFIG_H

#include <string>
class NovelConfig
{
public:
  static NovelConfig* getInstance();

  NovelConfig();

  /**
      * 根据类别名称获取类别ID
      */
  void getSortID(const  std::string& sortName, std::string& sortID);

  /**
      * 返回最大小说ID
      */
  unsigned int getMaxArticleID();

  unsigned int getMaxAttachID();

  /**
      * 返回最大章节ID
      */
  unsigned int getMaxChapterID();

  /**
    * 设定最大小说ID
    */
  inline void setMaxArticleID(const unsigned int id)
  {
    m_maxArticleID = id;
  }

  /**
    * 设定最大章节ID
    */
  inline void setMaxChapterID(const unsigned int id)
  {
    m_maxChapterID = id;
  }

  inline void setMaxAttachID(const unsigned int id)
  {
    m_maxAttachID = id;
  }

private :
  unsigned int m_maxArticleID;
  unsigned int m_maxChapterID;
  unsigned int m_maxAttachID;
};

#endif // NP_CONFIG_NOVELCONFIG_H
